package org.ghost.akka.common.model;

import org.ghost.akka.common.em.TaskTypeEnum;

import java.io.Serializable;

/**
 * 任務
 */
public class TaskJob implements Serializable {
    /**
     * 服务注册标识
     */
    public static final String BACKEND_REGISTRATION = "BackendRegistration";
    /**
     * 任务ID
     */
    private String taskId;
    /**
     * 任务类型
     */
    private TaskTypeEnum taskType;
    /**
     * 请求参数
     */
    private Object request;
    /**
     * 处理结果
     */
    private JobResult response;


    public TaskJob(String taskId, TaskTypeEnum taskType) {
        this.taskId = taskId;
        this.taskType = taskType;
    }


    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public TaskTypeEnum getTaskType() {
        return taskType;
    }

    public void setTaskType(TaskTypeEnum taskType) {
        this.taskType = taskType;
    }

    public Object getRequest() {
        return request;
    }

    public void setRequest(Object request) {
        this.request = request;
    }

    public JobResult getResponse() {
        return response;
    }

    public void setResponse(JobResult response) {
        this.response = response;
    }
}
